Allow mmap of /sys/kernel/btf/vmlinux#8976
Allow mmap of /sys/kernel/btf/vmlinux#8976kernel-patches-daemon-bpf[bot] wants to merge 4 commits intobpf-next_basefrom
Conversation
|
Upstream branch: b615ce5 |
7b56de2 to
49174bd
Compare
|
Upstream branch: b615ce5 |
b9dbe3e to
379746d
Compare
49174bd to
f3a4188
Compare
|
Upstream branch: 25b6d5d |
379746d to
e084a8a
Compare
f3a4188 to
f10d83e
Compare
|
Upstream branch: 4e2e684 |
e084a8a to
4d0c3c1
Compare
f10d83e to
9857a0f
Compare
|
Upstream branch: d90f0bc |
4d0c3c1 to
830d47c
Compare
9857a0f to
b93b30b
Compare
|
Upstream branch: 5ead949 |
830d47c to
8e4d231
Compare
b93b30b to
f4bae1b
Compare
|
Upstream branch: 6888a03 |
8e4d231 to
af5c8a1
Compare
|
Upstream branch: 6888a03 |
af5c8a1 to
e8d88cf
Compare
f4bae1b to
b8dcdbb
Compare
User space needs access to kernel BTF for many modern features of BPF. Right now each process needs to read the BTF blob either in pieces or as a whole. Allow mmaping the sysfs file so that processes can directly access the memory allocated for it in the kernel. remap_pfn_range is used instead of vm_insert_page due to aarch64 compatibility issues. Tested-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Lorenz Bauer <lmb@isovalent.com> Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Add a basic test for the ability to mmap /sys/kernel/btf/vmlinux. Ensure that the data is valid BTF and that it is padded with zero. Tested-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
|
Upstream branch: 8259eb0 |
Teach libbpf to use mmap when parsing vmlinux BTF from /sys. We don't apply this to fall-back paths on the regular file system because there is no way to ensure that modifications underlying the MAP_PRIVATE mapping are not visible to the process. Acked-by: Andrii Nakryiko <andrii@kernel.org> Tested-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
e8d88cf to
27cbb96
Compare
b8dcdbb to
e85324d
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=964584 irrelevant now. Closing PR. |
Pull request for series with
subject: Allow mmap of /sys/kernel/btf/vmlinux
version: 5
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=964584